{include file=header.html}
<DIV class="main">
{include file="header.common.html"}
<div class="content_info">
  <!--search begin-->
  <div class="search">
   <form method="GET" action="{url app=kd_order}">
    <!--{if $config.rewrite_enabled neq '1'}--><input type="hidden" value="kd_order" name="app"/><!--{/if}-->
    <input type="text" name="ydh" value="{if $smarty.get.ydh}{$smarty.get.ydh}{else}请输入运单号进行查询{/if}" class="soinput"/>
    <input type="submit" class="submit_yundan" value="运单查询"/>
   </form>
  </div>
  <!--search end-->

  <div class="daoda-box">
    <div class="box-cont">
        <!--{foreach from=$yundan_list item=list key=key}-->
        <dl class="OrderTracking">
          <!--{if $list.wuliu}-->
          <dt>
          <!--{foreach from=$list.wuliu item=list_second}-->
            <li><span class="icon"></span><p>{$list_second.yudan_text}</p><span class="time">{$list_second.addtime|date:complete}</span></li>        
          <!--{/foreach}-->
          <!--{else}-->
            <li><span class="icon"></span><p>暂无物流信息</p><span class="time">{$list.addtime|date:complete}</span></li>        
          <!--{/if}-->
          </dt>
          <!--{if $list.expressNo}-->
          <dd id="query_{$key}"></dd>
          <script type="text/javascript">
		    $.ajax({
				type: "get",
				async: false,
				url: "http://www.daoda100.com/data/jiekou/interface.php?call=yundan_mobile&express=中通快递&content={$list.expressNo}",
				dataType: "jsonp",
				jsonp: "callback",//传递给请求处理程序或页面的，用以获得jsonp回调函数名的参数名(一般默认为:callback)
				jsonpCallback:"backdata",//自定义的jsonp回调函数名称，默认为jQuery自动生成的随机函数名，也可以写"?"，jQuery会自动为你处理数据
				success: function(result){
				  if(result.status=='OK'){
					  var objson = eval("("+ result['result'] +")");
					  if(typeof(objson['traces'])=='undefined'){
						  $("#query_{$key}").hide();
					  }else{
						  $.each(objson['traces'],function(k){  
							$("#query_{$key}").append('<li><span class="icon"></span><p>'+objson['traces'][k]['remark']+'</p><span class="time">'+objson['traces'][k]['acceptTime']+'</span></li>'); 
						  }); 
					  }
				  }else{
					  $("#query_{$key}").hide();
				  }
				},error: function(){
				  $("#query_{$key}").hide();
				}
			 });
		  </script>
        </dl>
        <!--{/if}-->
        <!-- {foreachelse} -->
        <div class="error"><!--{if $smarty.get.ydh}-->非常抱歉，您的查询的单号无记录!<!--{else}-->请输入运单号进行查询<!--{/if}--></div>
        <!-- {/foreach} -->
    </div>
  </div>  
</div>
{include file=footer.html}
</DIV> 
</body>
</html>